home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / GNUUCP_2 / SOURCE / COMPORT.H < prev    next >
Text File  |  1989-07-31  |  2KB  |  60 lines

  1. /*
  2.  * Comport.h
  3.  *
  4.  * defines the bit masking for the get_mcr()
  5.  *
  6.  * @(#) comport.h    Version hoptoad-1.3    87/03/24
  7.  *
  8.  * Copyright (C) Tim M. Pozar 1987
  9.  * Anyone can use this code for anything, but it is copyright by Tim
  10.  * and you must leave his copyright in the code.
  11.  *
  12.  */
  13.  
  14. /*
  15.  * get_msr()
  16.  *   Function to read (get) the byte located in the Modem Status 
  17.  * Register (3FEh).  The table below describes the byte returned.
  18.  *   bit  description
  19.  *    0   Delta Clear to Send (DCTS)
  20.  *        Indicates that the !CTS input to the chip has changed state
  21.  *        since the last time it was read by the processor.
  22.  *    1   Delta Data Set Ready (DDSR)
  23.  *        Indicates that the !DRS input to the chip has changed since 
  24.  *        last time it was read by the processor.
  25.  *    2   Trailing Edge Ring Indicator (TERI)
  26.  *        Indicates that the !RI input to the chip has changed from
  27.  *        an on (logical 1) to an off (logical 0) condition.
  28.  *    3   Delta Rx Line Signal detect (DRLSD)
  29.  *        Indicates that the !RLSD input to the chip has changed state.
  30.  * NOTE: Whenever bit 0, 1, 2, or 3 is set to a logical 1, a modem status
  31.  *       interrupt is generated.
  32.  *
  33.  *    4   Clear to Send (CTS)
  34.  *        This bit is the complement of the clear to send (!CTS) input.
  35.  *        If bit 4 (LOOP) of the MCR is set to a logical 1, this is 
  36.  *        equivalent to RTS in the MCR.
  37.  *    5   Data Set Ready (DSR)
  38.  *        This bit is the complement of the data set ready (!DSR) input.
  39.  *        If bit 4 (LOOP) of the MCR is set to a logical 1, this is 
  40.  *        equivalent to DTR in the MCR.
  41.  *    6   Ring Indicator (RI)
  42.  *        This bit is the complement of the ring indicator (!RI) input.
  43.  *        If bit 4 (LOOP) of the MCR is set to a logical 1, this is 
  44.  *        equivalent to OUT 1 in the MCR.
  45.  *    7   Receive Line Signal Detect (RLSD) or Carrier Detect (CD).
  46.  *        This bit is the complement of the received line signal detect
  47.  *        (!RLSD) input. If bit 4 (LOOP) of the MCR is set to a logical 1,
  48.  *        this is equivalent to OUT 2 in the MCR.
  49.  */
  50.  
  51. #define  DCTS       1
  52. #define  DDSR       2
  53. #define  TERI       4
  54. #define  DRLSD      8
  55. #define  CTS       16
  56. #define  DST       32
  57. #define  RI        64
  58. #define  RLSD     128   /* Also known as ... */
  59. #define  CD       128   
  60.